* REPLICATION FILE FOR "UNSTABLE POLITICS: FISCAL SPACE AND ELECTORAL VOLATILITY IN THE INDIAN STATES"
* by Irfan Nooruddin & Pradeep Chhibber
* Comparative Political Studies 41 (8): 1069-1091
*********************************************************************************************************

*************

desc state elecvolatility incvotediff statecode id electionnum  turnout enop_votes enop_seats eff_groups sc_and_st cleavage_pol /*
*/ lnrealincome growth fiscalspace_percent lnfiscalspace post1991 

*************
set more off

tsset id electionnum

* FIGURE 1, TOP PANEL
hist elecvolatility, freq normal start(0) addlabels gap(1)
* FIGURE 1, BOTTOM PANEL
hist incvotediff, freq normal addlabels gap(1)

* FIGURE 2
graph bar elecvolatility incvotediff,over(statecode,sort(elecvolatility)) ytitle("% Vote Swing") /*
*/ blabel(bar, format(%2.1f)) legend(label(1 "Mean Electoral Volatility") label(2 "Mean Incumbent Vote Change"))

* TABLE 1; MODEL 1
xtreg elecvolatility l.elecvolatility d.turnout l.enop_votes d.enop_votes eff_groups sc_and_st cleavage_pol /* 
*/ lnrealincome growth fiscalspace_percent post1991, re cluster(id) i(id)

* TABLE 1: MODEL 2
xtreg elecvolatility l.elecvolatility d.turnout l.enop_votes d.enop_votes eff_groups sc_and_st cleavage_pol /* 
*/ lnrealincome growth lnfiscalspace post1991, re cluster(id) i(id)

**********************
**********************

* FOOTNOTE 24: CALCULATING EFFECTIVE PARTIES USING SEAT SHARES
xtreg elecvolatility l.elecvolatility d.turnout l.enop_seats d.enop_seats eff_groups sc_and_st cleavage_pol /* 
*/ lnrealincome growth fiscalspace_percent post1991, re cluster(id) i(id)
xtreg elecvolatility l.elecvolatility d.turnout l.enop_seats d.enop_seats eff_groups sc_and_st cleavage_pol /* 
*/ lnrealincome growth lnfiscalspace post1991, re cluster(id) i(id)

* FOOTNOTE 34: WITHOUT THE LAGGED DEPENDENT VARIABLE
xtreg elecvolatility d.turnout l.enop_votes d.enop_votes eff_groups sc_and_st cleavage_pol /* 
*/ lnrealincome growth fiscalspace_percent post1991, re cluster(id) i(id)
xtreg elecvolatility d.turnout l.enop_votes d.enop_votes eff_groups sc_and_st cleavage_pol /* 
*/ lnrealincome growth lnfiscalspace post1991, re cluster(id) i(id)

* FOOTNOTE 36: WITHOUT RANDOM EFFECTS
reg elecvolatility d.turnout l.enop_votes d.enop_votes eff_groups sc_and_st cleavage_pol /* 
*/ lnrealincome growth fiscalspace_percent post1991, cluster(id)
reg elecvolatility d.turnout l.enop_votes d.enop_votes eff_groups sc_and_st cleavage_pol /* 
*/ lnrealincome growth lnfiscalspace post1991, cluster(id)
